package com.yupi.usercenter.common;

public class ResultUtils {
    public static <T> BaseResponse<T> success(T data){
        return new BaseResponse<>(0,"ok",data);
    }
    public static  BaseResponse error(ErrorCode errorCode){
        return new BaseResponse<>(errorCode);
    }
    public static  BaseResponse error(ErrorCode errorCode,String msg,String description){
        return new BaseResponse<>(errorCode,msg,description);
    }
    public static  BaseResponse error(String msg,String description){
        return new BaseResponse<>(msg,description);
    }
    public static  BaseResponse error(int code,String msg,String description){
        return new BaseResponse<>(code,msg,description);
    }
}
